#include <File.au3>
#include <Array.au3>
Opt('MustDeclareVars', 1)
Global $file, $file2

_FileReadToArray("ospd.txt",$file)

Dim $arr[UBound($file)], $count = 0

For $i = 0 To UBound($file)-1 Step 1
   If StringLen($file[$i]) < 7 And StringLen($file[$i]) > 2 Then
	  $arr[$count] = $file[$i]
	  $count = $count+1
   EndIf
Next

$file2 = FileOpen("output.txt",1)
If $file2 = -1 Then
	MsgBox(0,"Error","Fandt ikke output filen!")
	Exit
 EndIf
 
 _FileWriteFromArray($file2,$arr)